package edu.gatech.arktos;

import java.util.HashMap;
import java.util.HashSet;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.Map;
import java.util.Set;


public class Team implements TeamInterface{
	private LinkedHashSet<Student> students = null;
	private int score, size;
	private Map<Student, Float> ratings = new HashMap<Student, Float>();
	private String name;

	public Team(LinkedHashSet<Student> student, int myscore, int size, String name)

	{
		this.students = student;
		this.score = myscore;
		this.size = size;
		this.name = name;
	}

	public LinkedHashSet<Student> getMembers() {
		
		return this.students;
	}

//	public String getTeamScore() {
//		return this.score;
//	}

	@Override
	public Map<Student, Float> getRatings() {
		return ratings;
	}

	@Override
	public void setRatings(Map<Student, Float> ratings) {
		this.ratings = ratings;
	}

	@Override
	public Float getRatingForStudent(Student s) {
		return ratings.get(s);
	}

	@Override
	public void setRatingForStudent(Student s, Float score) {
		
		if(ratings.get(s) != null)
		{
			ratings.remove(s);
		}
		ratings.put(s, score);
	}

	@Override
	public void setMembers(HashSet<Student> members) {
		this.students = (LinkedHashSet)members;
	}

	@Override
	public void addStudent(Student student) {
		this.students.add(student);
	}

	@Override
	public String getName() {
		return this.name;
	}

	@Override
	public void setName(String name) {
		this.name = name;
	}

	@Override
	public int getSize() {
		return this.size;
	}

	@Override
	public void setTeamScore(int teamScore) {
		this.score = teamScore;
	}

	@Override
	public int getTeamScore() {
		return this.score;
	}

	
	
}
